import request from "../utils/request";

export const login = (data, opts = {}) => {
    return request.post("/user/login", data, opts);
};

export const register = (data, opts = {}) => {
    return request.post("/user/register", data, opts);
};

export const getGoodsPage = (data, opts = {}) => {
    return request.get("/goods/getGoodsPage", data, opts);
};

export const detail = (data, opts = {}) => {
    return request.get("/goods/detail", data, opts);
};

export const getCarts = (data, opts = {}) => {
    return request.get("/cart/getCarts", data, opts);
};

export const addCart = (data, opts = {}) => {
    return request.get("/cart/addCart", data, opts);
};

export const deleteCart = (data, opts = {}) => {
    return request.get("/cart/deleteCart", data, opts);
};